package com.process.service;

import com.auth.vo.process.ApprovalVo;
import com.auth.vo.process.ProcessFormVo;
import com.auth.vo.process.ProcessQueryVo;
import com.auth.vo.process.ProcessVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.auth.model.process.Process;

import java.util.Map;

/**
 * <p>
 * 审批类型 服务类
 * </p>
 *
 * @author tang
 * @since 2023-07-23
 */
public interface OaProcessService extends IService<Process> {
    /**
     * 获取分页列表
     *
     * @author Tangjiachang
     * @date 2023/7/23 16:16
     * @param processPage:
     * @param processQueryVo:
     * @return IPage<ProcessVo>
     **/
    IPage<ProcessVo> selectPage(Page<ProcessVo> processPage, ProcessQueryVo processQueryVo);
    /**
     * 部署流程定义
     *
     * @author Tangjiachang
     * @date 2023/7/23 17:37
     * @param deployPath:
     * @return void
     **/
    void deployByZipFile(String deployPath);
    /**
     * 启动流程实例
     *
     * @author Tangjiachang
     * @date 2023/7/23 19:23
     * @param processFormVo:
     * @return void
     **/
    void startUp(ProcessFormVo processFormVo);

    /**
     * 获取待办列表
     *
     * @author Tangjiachang
     * @date 2023/7/24 21:39
     * @param processPage: 
     * @return Page<Process>
     **/
    Page<ProcessVo> findPending(Page<Process> processPage);

    /**
     * 显示审批详情
     *
     * @author Tangjiachang
     * @date 2023/7/24 23:06
     * @param id: 
     * @return Map<String,Object>
     **/
    Map<String, Object> show(Long id);

    /**
     * 审批接口
     *
     * @author Tangjiachang
     * @date 2023/7/25 21:31
     * @param approvalVo: 
     * @return void
     **/
    void approve(ApprovalVo approvalVo);

    /**
     * 获取已处理列表
     *
     * @author Tangjiachang
     * @date 2023/7/25 21:56
     * @param processPage: 
     * @return IPage<ProcessVo>
     **/
    IPage<ProcessVo> findProcessed(Page<Process> processPage);

    /**
     * 获取已发起流程列表
     *
     * @author Tangjiachang
     * @date 2023/7/25 22:11
     * @param processVoPage:
     * @return IPage<ProcessVo>
     **/
    IPage<ProcessVo> findStarted(Page<ProcessVo> processVoPage);
}
